package com.at.source3;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author huangchao E-mail:fengquan8866@163.com
 * @version 创建时间：2024/9/23 20:59
 */
public class CollectionDemo1 {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStreamSource<Integer> source = env
                // 直接读元素
                .fromElements(1, 22, 33);
        // TODO 从集合读取数据
//                .fromCollection(Arrays.asList(1, 22, 3));

        source.print();

        env.execute();
    }
}
